﻿#region Copyright Information
// // ****************************************************************
// // Feel free to extend or modify the code of the application to your needs. 
// // But remember do it for the Glory of our Lord Jesus Christ
// // ****************************************************************
#endregion
#region Usings

using System.Collections.Generic;
using Data;

#endregion

namespace Interfaces.Persistence
{
    /// <summary>
    /// Defines the behaviour of the PersistenceManager class.
    /// </summary>
    public interface IPersistanceManager
    {
        /// <summary>
        /// Returns all the <see cref="SongInfo"/> in the Persistence.
        /// </summary>
        /// <returns><code>List[SongInfo]</code></returns>
        IEnumerable<SongInfo> GetAll();

        /// <summary>
        /// Returns a song by its name.
        /// </summary>
        /// <param name="name">The name of the song.</param>
        /// <returns>All the information associated with a song.</returns>
        SongInfo GetSongByName(string name);

        /// <summary>
        /// Add a Song to the Persistence.
        /// </summary>
        /// <param name="song">Song name.</param>
        void AddSong(SongInfo song);

        /// <summary>
        /// Removes a song from the Persistence.
        /// </summary>
        /// <param name="song">Song name.</param>
        void RemoveSong(string song);

        /// <summary>
        /// Updates a song.
        /// </summary>
        /// <param name="song">The song to pe updated.</param>
        void UpdateSong(SongInfo song);

        /// <summary>
        /// Save the configuration file.
        /// </summary>
        /// <param name="configurationPath">The path where to save the file.</param>
        /// <param name="songs">The location to save the file.</param>
        void Save(string configurationPath, IEnumerable<SongInfo> songs);
    }
}